import { Placement } from "./utils"

export function createFiber(vnode, returnFiber) {
  // stateNode  函数组件没有  类组件的话是他的实例
  const newFiber = {
    type: vnode.type,
    key: vnode.key,
    props: vnode.props,
    child: null,
    sibling: null,
    return: returnFiber,
    flags: Placement, //
    alternate: null, // old fiber
    stateNode: null,
  }
  return newFiber
}